﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Crazycrash.UI
{
    public partial class Totaltimer : UserControl
    {
        Int16 totaltime = 60;
        Graphics g;
        public Totaltimer()
        {
            InitializeComponent();
            g = CreateGraphics();
            timer.Start();
        }
        private void timer_Tick(object sender, EventArgs e)
        {
            Font aFont = new Font("Arial", 16, FontStyle.Bold | FontStyle.Italic);
            totaltime -= 1;
            g.Clear(this.BackColor);
            g.FillRectangle(Brushes.Red, 0, 0, totaltime * 7, 30);
            g.DrawString("Left time:" + totaltime.ToString(), aFont, Brushes.Red, 430, 0);
        }
    }
}
